home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-12-15 | 1.3 KB | 31 lines | [TEXT/GEOL] |
- Item 1961432 12-Dec-89 09:01
-
- From: A14 Carnegie Mellon, Rob Chandok,PRA
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Re: Failure Handling
-
- On clarification, I think, regarding Jeff's explanation of failure handlers.
- He claims that since registers are restored when a failure is "caught" in the
- handler, that local variables values are restored. I don't think this is
- necessarily the case.
-
- There may be too many bytes of local variables to fit into registers, so at the
- time of the failure if you inspect the value of a local you should assume that
- values of the local are the *latest* values. Of course, if the compiler does
- leave some locals in the registers, they would be restored to their old values.
- My suspicion is that since the locals could be up-level addressed by the
- failure handler, the compiler won't leave out of date copies on the stack.
-
- In general, I am just trying to point out that you shouldn't depend on the
- state of locals being restored by your failure handler. The failure handler
- references locals in the "main" procedure as uplevel addressed, which means
- they are referenced via a frame ptr, not directly from a register.
-
- I know, a minor point. But possibly fatal for someone. Sorry for the tirade.
- I liked Jeff's explanation alot, otherwise.
-
- Rob
-
-